import QtQuick 2.0

Rectangle {
    width: parent.width / 4
    height: parent.height

    property string sourceImage;
    property string title;
    property int check_item: 0;

    color: check_item === 0 ? "#ffffff" : "#14aaff"

    signal clickItem;

    Column {
        id: id_column

        spacing: 4 * m_ratio
        anchors.verticalCenter: parent.verticalCenter
        anchors.horizontalCenter: parent.horizontalCenter
        Image {
            width: widthItem
            height: heightItem
            id: id_img
            source: sourceImage
        }
        Text {
            id: id_txtFacebook
            text: title

            color: "#000000"
            font.family: "Arial"
            wrapMode: Text.WordWrap
            font.pixelSize: 14 * m_ratio;

            opacity: 0.5
        }
    }

    MouseArea {
        id: id_mouse
        anchors.fill: parent

        onClicked: {
            clickItem();
        }
    }
}
